package com.drw.start.oauth2.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.drw.start.oauth2.dao.UsersRepository;

@Service
@Transactional
public class UsersServiceImpl implements IUsersService {

    @Autowired
    private UsersRepository mUsersRepository;

    @Override
    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
        return mUsersRepository.findByUsername(username);
    }


}
